<?php

/**
 * Author: LCY<409028735@qq.com>
 * Time: 2021/11/19 14:42
 * Note:
 */

namespace app\common\model;

use think\Model;
use think\Db;

class Groups extends Model
{
    /**
     * 查询所有可用的小组
     *
     * @return void
     */
    public static function getAllGroups()
    {
        $datas = Db::name('groups')->where('is_del', 0)->where('status', 1)->order('sort asc,id asc')->select();
        return $datas ?: [];
    }
}
